import * as apiTest from './test'
import * as newsApi from './news'

const apiObj = {
  apiTest,
  newsApi
}

const install = Vue => {
  if (install.installed) return
  install.installed = true
  Object.defineProperties(Vue.prototype, {
    $api: {
      get () {
        return apiObj
      }
    }
  })
}

export default install
